Temporary fix for getting VERSION and SOVERSION into cmake
authorTony Kelman <tony@kelman.net>
Mon, 9 Mar 2015 01:09:35 +0000 (18:09 -0700)
committerTony Kelman <tony@kelman.net>
Mon, 9 Mar 2015 23:27:40 +0000 (16:27 -0700)
only use ${SO_MAJOR} for cmake SOVERSION

use 1.2.0 for version in cmake

use only abi version for VERSION property in cmake

CMakeLists.txt
Makefile

index 4d0c1c37720e1bacdd051c7cb3b6156b54d8c51d..da6aa78408b422cda10af7efe1b2e579e0e6f3f5 100644 (file)
@@ -6,6 +6,11 @@ disallow_intree_builds()
 
 project (utf8proc C)
 
+# Be sure to also update these in Makefile!
+set(SO_MAJOR 1)
+set(SO_MINOR 2)
+set(SO_PATCH 0)
+
 add_definitions (
   -DUTF8PROC_EXPORTS
 )
@@ -19,4 +24,8 @@ add_library (utf8proc
   utf8proc.h
 )
 
-set_property (TARGET utf8proc PROPERTY POSITION_INDEPENDENT_CODE ON)
+set_target_properties (utf8proc PROPERTIES
+  POSITION_INDEPENDENT_CODE ON
+  VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}"
+  SOVERSION ${SO_MAJOR}
+)
index 99571e329bd3ae2755679734a9025d71dabf1b0c..f40a1163b22a4c510ba3eb0219f7370c784715e0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,7 @@ cc = $(CC) $(cflags)
 # from the utf8proc version number because it indicates ABI compatibility,
 # not API compatibility: MAJOR should be incremented whenever *binary*
 # compatibility is broken, even if the API is backward-compatible
+# Be sure to also update these in CMakeLists.txt!
 MAJOR=1
 MINOR=2
 PATCH=0